State
Any significant power changing event in meshtastic should be tagged with a powermon state transition.
If you are making new meshtastic features feel free to add new entries at the end of this definition.
Content copied to clipboard
meshtastic.PowerMon.State
Entries
Properties
Link copied to clipboard
BT_On = 64;
Link copied to clipboard
CPU_DeepSleep = 1;
Link copied to clipboard
CPU_LightSleep = 2;
Link copied to clipboard
GPS is actively trying to find our location
See GPSPowerState for more details
Content copied to clipboard
GPS_Active = 2048;
Link copied to clipboard
LED_On = 128;
Link copied to clipboard
Lora_RXActive = 32;
Link copied to clipboard
Lora_RXOn = 8;
Link copied to clipboard
Lora_TXOn = 16;
Link copied to clipboard
None = 0;
Link copied to clipboard
Screen_Drawing = 512;
Link copied to clipboard
Screen_On = 256;
Link copied to clipboard
The external Vext1 power is on. Many boards have auxillary power rails that the CPU turns on only
occasionally. In cases where that rail has multiple devices on it we usually want to have logging on
the state of that rail as an independent record.
For instance on the Heltec Tracker 1.1 board, this rail is the power source for the GPS and screen.
The log messages will be short and complete (see PowerMon.Event in the protobufs for details).
something like "S:PM:C,0x00001234,REASON" where the hex number is the bitmask of all current states.
(We use a bitmask for states so that if a log message gets lost it won't be fatal)
Content copied to clipboard
Vext1_On = 4;
Link copied to clipboard
Wifi_On = 1024;
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Link copied to clipboard
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.